"""
位置 PO
"""

from models import POBase
from models.other import (
    Dimensions,
    Vector3D,
)
from my_typing import *
from utils.data_utils.special import ObjectIdStr
from utils.validator_utils.pydantic_validator.field import (
    CharField,
    NormalField,
)


class FamilyPositionPO(POBase):
    """ 位置 | PO """

    alias: StrOrNone = CharField(None, title="别名", min_length=3, max_length=32)
    description: StrOrNone = CharField(None, title="描述", min_length=1, max_length=200)
    dimensions: Dimensions | None = NormalField(..., description="位置的尺寸（长宽高）")
    furniture_id: ObjectIdStr = CharField(..., title="家具 ID")
    name: str = CharField(..., title="名称", min_length=1, max_length=32)
    position_2_room: Vector3D | None = NormalField(None, title="位置（对于家具来说）")
    user_id: ObjectIdStr = NormalField(..., title="用户 ID")
